The invention relates generally to a method and system for state management of an application, and more specifically, to a computer-implemented method for controlling a web application state in a micro-service architecture. The invention relates further to a system for controlling a web application state in a micro-service architecture, and a computer program product.
The usage of web interfaces and portals for consumer applications on mobile devices, as well as enterprise applications, is ever increasing. The usage of stateless user interfaces is the norm. Thus, in traditional web applications and web portal systems, the state of a given web application or set of web applications provides major challenges due to the stateless characteristics and design criteria of traditional web interfaces. This situation has led to sophisticated approaches in order to maintain a state of a web application across user sessions by, e.g., putting a representation of the web application or web portal state into the URL (universal resource locator) of the served resource.
This applies especially to those web portal solutions that aggregate multiple web applications into a single HTML (HyperText Markup Language) document with each web application requiring its own state management.
Session management in web applications usually supports the persistence of volatile information that may contribute to an actual state of the web application. This data is commonly managed by the web portal and bound to a specific user session which may be identified by an HTTP cookie and/or URL parameter.
Traditionally, the state of a web application may be represented by complex URLs that encode the state of all states for portions of all web pages of the report. These URLs are generated by the web application or web portal server which comprise a corresponding state management and respective URL generation components. Hence, web applications are responsible for managing their web application state for a given session. The session may be identified by an HTTP cookie and/or a URL parameter.
It is obvious that these approaches to solve the session management challenges have led to various drawbacks in today's state handling. The representation of web portal states in the URL have led to URLs which are complex and which a user can hardly understand or read. The vast amount of information presented in the URL state has led to the reaching of URL length limitations supported by web browsers, web proxies, web servers and the like. This will also lead to a low level of acceptance for state for the URLs, for example, when trying to share links via email with other users or using another device with another browser. The exceeded ends of the URL length limitations may also lead to storing portions of the state information in a persistence layer of the web application servers or web portals, which may thus lead to increased required computing power and amount of memory.
Furthermore, the fact that the complete state is represented in URLs in today's web portal systems may lead to the need for encoding and decoding information on the server or on the client. Once represented in a URL, the state information is valid until the web applications that are associated with this state information are retired. Other drawbacks of known solutions include a complex generation process for extended URLs, the possibility to manipulate state URLs as well as potentially or accidentally user initiated deletions of HTTP cookies, which result in a loss of the user's web application state.
Thus, the known approaches for session or state management in web applications and/or portals have a limited appeal and clear negative characteristics.